<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"  xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="system/user/include :: header"></head>
<head th:include="include :: header"></head>
<body class="gray-bg">
	<div class="wrapper wrapper-content animated fadeInRight">
		<div class="col-sm-12">
			<div class="ibox">
				<div class="ibox-body">
					<div class="fixed-table-toolbar">
						<div class="columns pull-right" role="group">
							<button class="btn btn-danger" onclick="exportgysBalanceLogs()">
								<i aria-hidden="true" class="fa fa-mail-reply-all"></i>导出
							</button>
							<button class="btn btn-success" onclick="reLoad()">
								<i class="fa fa-search" aria-hidden="true"></i>查询
							</button>
						</div>
						<div class="pull-right search col-md-1 nopadding">
							<input id="realname" type="text" class="form-control" placeholder="供应商名称">
						</div>
						<div class="pull-right search col-md-1 nopadding">
							<input id="nickname" type="text" class="form-control" placeholder="供应商姓名">
						</div>
						<div class="pull-right search col-md-1 nopadding">
							<input id="mobile" type="text" class="form-control" placeholder="供应商手机号">
						</div>
						<div class="columns pull-right col-md-1 nopadding">
							<input type="text" class=" form-control" id="createTimeEnd" name="createTimeEnd" placeholder="请选择结束日期"
								   onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"
								   style="background-color: #fff;" readonly="readonly"/>
						</div>
						<div class="columns pull-right">
							<label style="font-weight: 700;float: left;padding: 3px 10px;line-height: 2;font-size: 15px">
								<i class="fa fa-exchange"></i>
							</label>
						</div>
						<div class="columns pull-right col-md-1 nopadding">
							<input type="text" class=" form-control" id="createTimeStart" name="createTimeStart" placeholder="请选择开始日期"
								   onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"
								   style="background-color: #fff;" readonly="readonly"/>
						</div>
						<input type="hidden" name="centreId" th:value="${centreId}" th:if="${flag} == '1'">
						<div class="columns pull-right col-md-1 nopadding" th:if="${flag} == '0'">
							<select data-placeholder="商户" class="form-control chosen-select" name="centreId" tabindex="2">
								<option value="">选择商户</option>
								<option th:each="item: ${centreList}" th:text="${item.name}" th:value="${item.centreId}"></option>
							</select>
						</div>

					</div>
					<table id="supplycwbalanceLogTable" data-mobile-responsive="true"></table>
				</div>
			</div>
		</div>
	</div>
	<div th:include="include :: footer"></div>
	   <script src="/js/plugins/distpicker/distpicker.data.min.js" ></script>
    <script src="/js/plugins/distpicker/distpicker.min.js" ></script>
	<script type="text/javascript" src="/js/appjs/mall/supply/supplycwbalanceLog.js"></script>
	<script type="text/javascript">
	function exportgysBalanceLogs(){
		var   mobile=$.trim($("#mobile").val());
		var   realname=$.trim($("#realname").val());
		var   nickname=$.trim($("#nickname").val());
		var   start= $('#createTimeStart').val();
		var   end= $('#createTimeEnd').val();
		if(start==''||end==''){
			alert("请选择时间段!");
			return;
		}
	    window.location.href = prefix + "/gyscwexprot?start="+start+ "&end="+end 
	    +"&mobile="+ mobile +"&realname=" + realname+"&nickname="+nickname ;
	}
	</script>
</body>
</html>